package com.zjhb.common.enumutil;

public enum Area {
	Office("0", "办公区"),
	Life("1", "生活区"),
	Public("2","公共区域"),
	OutSide("3","场站保障设施");
		

	private String key;
	private String value;

	private Area(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static Area parse(String key) {
		Area [] areas=Area.values();
		for(Area a:areas){
			if(a.getKey().equals(key)){
				return a;
			}
		}
        return null;
	}

	public static Area parseValue(String value) {
		Area [] areas=Area.values();
		for(Area a:areas){
			if(a.getValue().equals(value)){
				return a;
			}
		}
        return null;
	}

}
